package com.four.hospital.controller;

import com.four.hospital.entity.DoctorAndUser;
import com.four.hospital.service.DoctorAndUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author:luojie
 * @Date: 2022/01/05/18:39
 * @Description
 */
@RestController
@RequestMapping("hospital/doctorAndUser")
public class DoctorAndUserController {

    @Autowired
    private DoctorAndUserService doctorAndUserServic;

    /**
     * 中间表根据患者id回显数据
     *
     * @param duId
     * @return
     */
    @GetMapping("/docAndUser/{duId}")
    private DoctorAndUser doctorAndUser(@PathVariable("duId")Integer duId){
        DoctorAndUser doctorAndUser=doctorAndUserServic.docAndUser(duId);
        return doctorAndUser;
    }
}
